﻿using _1_Interfaces.Models.Dtos.Cjw;
using _1_Interfaces.Models.Tables.Cjw;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace _3_Controllers
{
    /// <summary>
    /// 3、配置AutoMapper映射规则
    /// </summary>
    public class AutoMapperProfile : Profile
    {
        /// <summary>
        /// 配置构造函数，用来创建关系映射
        /// </summary>
        public AutoMapperProfile()
        {
            //第一个参数是原对象，第二个是目的对象。ReverseMap代表着两个对象能够相互转换
            //Cjw
            CreateMap<AdminList, AdminRegisterDto>().ReverseMap();
            CreateMap<OperationList, OperationListAddDto>().ReverseMap();
            CreateMap<SickBedList, SickBedListAddDto>().ReverseMap();
            CreateMap<SickBedList, GetPatientRecordListDto>().ReverseMap();
            CreateMap<PatientRecordList, GetPatientRecordListDto>().ReverseMap();
            CreateMap<ChatList, UserSendDto>().ReverseMap();

        }
    }
}
